<table datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger" class="table table-striped table-bordered">
  <thead>
  <tr>
    <th>Object ID</th>
    <th>Type</th>
    <th>Summary</th>
    <th>Link</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let reference of referenceList">
    <th scope="row">{{reference.object_information.object_id}}</th>
    <td>
      <a routerLink="/framework/object/type/{{reference.type_information.type_id}}">
        {{reference.type_information.type_label}}
      </a>
    </td>
    <td>
      <i class="{{reference?.type_information?.icon}}"></i> {{reference?.type_information?.type_label}}
      #{{reference?.object_information?.object_id}}
      <span *ngFor="let sum of reference?.summaries; let last = last; let first = first">
        <ng-template [ngIf]="sum.type != 'date'" [ngIfElse]="templateDate">
            <span *ngIf="first"> - </span>{{sum.value}}
        </ng-template>
        <ng-template #templateDate>
            <span *ngIf="first"> - </span>{{(sum.value && sum.value.$date)? (sum.value.$date | date:"dd/MM/yyyy") : " - "}}
        </ng-template>
        <span *ngIf="!last"> | </span>
      </span>
    </td>
    <td>
      <a class="table-center" routerLink="/framework/object/view/{{reference.object_information.object_id}}">
        <i class="far fa-arrow-alt-circle-right"></i>
      </a>
    </td>
  </tr>
  </tbody>
</table>
